package com.erp.programmer.dto;

import com.erp.programmer.annotation.ValidateEntity;
import com.erp.programmer.domain.Role;

public class LocalCompanyDto {
    /**
     * ID
     */
    private String id;


    /**
     * 用户名
     */
    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=8,minLength=1,errorRequiredMsg="用户名不能为空！",errorMaxLengthMsg="用户名长度不能大于8！",errorMinLengthMsg="用户名长度不能小于1！")
    private String username;

    /**
     * 密码
     */
    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=16,minLength=1,errorRequiredMsg="用户密码不能为空！",errorMaxLengthMsg="用户密码长度不能大于16！",errorMinLengthMsg="用户密码长度不能小于1！")
    private String password;

    /**
     * 角色ID
     */
    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=19,minLength=19,errorRequiredMsg="角色ID不能为空！",errorMaxLengthMsg="角色ID不能大于19！",errorMinLengthMsg="角色ID长度不能小于19！")
    private String roleId;

    private RoleDto roleDto;
    /**
     * 电话
     */
    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=11,minLength=11,errorRequiredMsg="手机号不能为空！",errorMaxLengthMsg="手机号长度不能大于11！",errorMinLengthMsg="用户密码长度不能小于1！")
    private String phone;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }


    public RoleDto getRoleDto() {
        return roleDto;
    }

    public void setRoleDto(RoleDto roleDto) {
        this.roleDto = roleDto;
    }


    @Override
    public String toString() {
        return "LocalCompany{" +
                "id=" + id +
                ", username=" + username +
                ", password=" + password +
                ", roleId=" + roleId +
                ", phone=" + phone +
                "}";
    }
}
